package com.ruoyi.web.controller.invoice;

import com.ruoyi.third.base.InvoiceApiResult;
import com.ruoyi.third.entity.request.CreateUser;
import com.ruoyi.third.service.ThirdApiService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@Api(tags = "开票员")
@RestController
@AllArgsConstructor
@RequestMapping("invoice/createUser")
public class CreateUserController {

    private final ThirdApiService thirdApiService;


    @ApiOperation(value = "开票员注册", httpMethod = "POST")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "CreateUser", value = "CreateUser", dataTypeClass = CreateUser.class)
    })
    @PostMapping("createUser")
    public InvoiceApiResult createUser(@RequestBody @Validated CreateUser param) {
        return thirdApiService.createUser(param);
    }


}
